
    Observer.implement
    (
        
        function update (notification, sender) 
        {
            
        }
    
    );
    
    function Observer () {;};
    
    
    
    Observable.implement
    (
        function addObserver (value) 
        {
            if (!(Object.is(value) && Function.is(value.update)))
                return;
            
            this.observers.unshift(value);    
        }
        
    ,   function removeObserver (value) 
        {
            var i= this.observers.indexOf(value)
            if (i > -1)
                this.observers.splice(i, 1);
        }
        
    ,   function notifyObservers (notification) 
        {
            if (!this.changed)
                return;
                
            this.changed= false;
            
            var observers= this.observers.concat()
            ,   target= this.target
            ,   n= observers.length;
            
            while (n--) 
            {
                observers[n].update(notification, target);
            }
        }
        
    ,   function setChanged () 
        {
            this.changed= true;
        }
    
    );
    
    function Observable (target) 
    {
        this.target= target || this;
        this.observers= [];
    };
